home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm1 / npns.lha / npns / NewPostNewsSpool.doc next >
Text File  |  1996-04-20  |  6KB  |  199 lines

  1.                New Post News Spool v4.2
  2.  
  3.                    by
  4.  
  5.                   Nick d'Alterio
  6.  
  7.                    April 1996
  8.  
  9.  
  10. Introduction
  11. -------------
  12.  
  13. A while back I was looking for a way of spooling news so that I could 
  14. write articles offline and then send them when I went online. I found
  15. the a set of programs to do this in PostNewsSpool by James Burton.
  16.  
  17. However I found that there were a number of problems with postnews
  18. and sendnews such as:-
  19.  
  20. The check to see if online took far too long
  21. Locks were often left on the spool dir 
  22. Lots of unnecessary files were produced
  23. If news posting fails for some reason the message was lost
  24.  
  25. These versions have eliminated these problems and added a couple 
  26. of extra features.
  27.  
  28. Installation
  29. ------------
  30.  
  31. Copy sendnews and postnews to somewhere on your path and set the 
  32. appropriate environment variable described below.
  33.  
  34. postnews should be the program that is called by your news reading
  35. program to post the news. This will spool the article so that you 
  36. can use sendnews to send it off when you go online.
  37.  
  38. Although it is possible to use to spool news without the rest of the
  39. package I recommend that you get the complete postnewsspool archive
  40. by James Burton.
  41.  
  42. Updating
  43. --------
  44.  
  45. Note that from version 3 sendnews will attempt to send any article
  46. in the spooldir no matter what the name is. So if your news reader
  47. produces a fully formed news article with header you can drop it
  48. straight into the spooldir without using postnews.
  49.  
  50. You should remove the seq file if you had it in your spooldir and 
  51. the env variable PNS_SEQFILE
  52.  
  53. If updating from version 3.x to 4.x note that the postnews argument -from has
  54. now changed to -f.
  55.  
  56. Online Check
  57. ------------
  58.  
  59. Since version 4.2 npns uses an enviroment variable ONLINE to determine
  60. if the machine is online or not. If this variable is set to 0 then 
  61. you are assumed to be offline anything else indicates you are online.
  62.  
  63. If this variable does not exist then both postnews and sendnews assume
  64. that you are offline.
  65.  
  66. This variable should be setup in the startnet and stopnet scripts for
  67. best use.
  68.  
  69. Sendnews
  70. --------
  71.  
  72. Simply run the program and it will send off all messages in the
  73. spool directory indicated by the environment variable PNS_SPOOLDIR
  74. (AmiTCP:Usr/Spool/News by default).
  75.  
  76. The news articles will be posted using the program specified in
  77. PNS_NNTPPOST (AmiTCP:bin/NNTPPost by default ). If the posting program
  78. fails to post the article the article will then be appended to the
  79. end of the failed archive indicated by PNS_FAILED_ARC 
  80. ( AmiTCP:Usr/Spool/sendnews.failed by default ). Each file in the
  81. failed archive will be separated by a line containing the date and time
  82. sendnews failed to post the article. 
  83.  
  84. Remember that NNTPPost requires that the environment variable NNTPSERVER
  85. is set.
  86.  
  87. Postnews
  88. --------
  89.  
  90. This spools a news article ready for posting when online. The article can
  91. be complete with header (as prepared by tin) or in its component parts, in which
  92. case postnews puts them together so that the article is ready for posting (Grn style).
  93.  
  94. It places the article in the spool directory PNS_SPOOLDIR (AmiTCP:Usr/Spool/News by default). 
  95. The spooled filename has the format msg.######### where ###### is a 
  96. number which refers to the time of writing.
  97.  
  98. If online at the time of writing the article then postnews immediately
  99. executes sendnews (which must be in AmiTCP:bin/) to send off the article.
  100. To stop postnews from sending the article create an enviroment variable
  101. called PNS_OFFLINE.
  102.  
  103. The order of the command line options below is not important. However if the 
  104. option -R or the article is specified more than once then the last occurence
  105. will be used.
  106.  
  107. Command line options:-
  108.  
  109.     -f    "someone@somewhere"      Add a from line to the header of
  110.                        article.
  111.  
  112.     -n                   Don't call sendnews if online
  113.                        (equivalent to PNS_OFFLINE)
  114.  
  115.         -R     filename                Get the article header from the specified
  116.                                        file.
  117.  
  118.     -x     filename                Delete file if posting is a success.
  119.  
  120.     -h                             Prints some help
  121.  
  122.  
  123. If the parameter for options f, R and x is skipped then the program will print an error
  124. message and exit. (The exception here is if the parameter is skipped and the article
  125. name is the next thing on the command line).
  126.  
  127. The option -x can appear up to 16 times on the command line after which any additional 
  128. usage will be ignored. (This isn't a delete program!!!)
  129.  
  130. Usage Examples
  131. --------------
  132.  
  133.     postnews article        Spools fully formed article 
  134.  
  135.     postnews < article        Spools fully formed article from stdin
  136.  
  137.     postnews article -x article    Spools article then deletes original
  138.  
  139.     postnews body -R header         Spools article made from header and body
  140.  
  141.         postnews body -R header -x header -x body    As above but deletes the original files
  142.  
  143.  
  144. e.g. For tin I use
  145.  
  146. set TIN_POST amitcp:bin/postnews -f "nagd@doc.ic.ac.uk (Nicholas d'Alterio)" %s
  147.  
  148. for Grn try
  149.  
  150.    amitcp:bin/postnews .artcle -R .header -x .article -x .header
  151.  
  152.     
  153. History
  154. -------
  155.  
  156. 4.2   - Various bugs in online check (schlonz@xantilon.ame.osn.de)
  157.     Online check system redesigned, should work for any system now.
  158.       - Remove -a option. No longer had any purpose.
  159.       - Doesn't bother with DOS library opening anymore (let SAS handle this)
  160.       - sendnews can now appear anywhere on the path instead of amitcp:bin
  161. 4.1   - Postnews - New command line options -R, -x (for Grn users), -a
  162.       - Postnews - Changed check for onlineness
  163.       - Postnews - Improved command line checks
  164. 3.2   - New enviroment variable PNS_OFFLINE
  165. 3.1   - Now uses ADOS functions
  166.       - seq file no longer needed
  167.       - ANY file in the spooldir will be sent
  168.       - the failed archive entries are separated by a line
  169.     containing the time the file failed.
  170.       - new env variable PNS_NNTPPOST allows user to specify
  171.     program to post news
  172.  
  173. 2.1   - Added support for environment variables
  174. 1.x   - Internal test versions
  175.  
  176. Conditions of Use
  177. -----------------
  178.  
  179. Use it how you like just remember I accept NO liability for
  180. ANYTHING that happens.
  181.  
  182. Let me know of what you think of it, bugs, etc
  183.  
  184. Thanks
  185. ------
  186.  
  187. Thanks to James Burton for the original idea and code.
  188.           Jeroen T Vermeulen for some new ideas.
  189.  
  190. ToDo
  191. ----
  192.  
  193. Make sendnews a full NNTP posting client (AmiTCP)
  194.  
  195. ------------------------------------------------------------------------------------
  196. Nick d'Alterio (nagd@doc.ic.ac.uk)
  197.  
  198. $Id: NewPostNewsSpool.doc 1.7 1996/04/20 13:33:24 nagd Exp $
  199.